package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "property_set",  catalog = "")
public class PropertySet {
    private Integer id;
    private String propertyName;
    private String useUuid;
    private String propertyType;
    private String propertyStatus;
    private Long updataTime;
    private Long newTime;
    private String unitPrice;
    private Integer unitCount;
    private Long applyTime;
    private String proDescribe;
    private String proRemark;

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "property_name")
    public String getPropertyName() {
        return propertyName;
    }

    public void setPropertyName(String propertyName) {
        this.propertyName = propertyName;
    }

    @Basic
    @Column(name = "use_uuid")
    public String getUseUuid() {
        return useUuid;
    }

    public void setUseUuid(String useUuid) {
        this.useUuid = useUuid;
    }

    @Basic
    @Column(name = "property_type")
    public String getPropertyType() {
        return propertyType;
    }

    public void setPropertyType(String propertyType) {
        this.propertyType = propertyType;
    }

    @Basic
    @Column(name = "property_status")
    public String getPropertyStatus() {
        return propertyStatus;
    }

    public void setPropertyStatus(String propertyStatus) {
        this.propertyStatus = propertyStatus;
    }

    @Basic
    @Column(name = "updata_time")
    public Long getUpdataTime() {
        return updataTime;
    }

    public void setUpdataTime(Long updataTime) {
        this.updataTime = updataTime;
    }

    @Basic
    @Column(name = "new_time")
    public Long getNewTime() {
        return newTime;
    }

    public void setNewTime(Long newTime) {
        this.newTime = newTime;
    }

    @Basic
    @Column(name = "unit_price")
    public String getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(String unitPrice) {
        this.unitPrice = unitPrice;
    }

    @Basic
    @Column(name = "unit_count")
    public Integer getUnitCount() {
        return unitCount;
    }

    public void setUnitCount(Integer unitCount) {
        this.unitCount = unitCount;
    }

    @Basic
    @Column(name = "apply_time")
    public Long getApplyTime() {
        return applyTime;
    }

    public void setApplyTime(Long applyTime) {
        this.applyTime = applyTime;
    }

    @Basic
    @Column(name = "pro_describe")
    public String getProDescribe() {
        return proDescribe;
    }

    public void setProDescribe(String proDescribe) {
        this.proDescribe = proDescribe;
    }

    @Basic
    @Column(name = "pro_remark")
    public String getProRemark() {
        return proRemark;
    }

    public void setProRemark(String proRemark) {
        this.proRemark = proRemark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PropertySet that = (PropertySet) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(propertyName, that.propertyName) &&
                Objects.equals(useUuid, that.useUuid) &&
                Objects.equals(propertyType, that.propertyType) &&
                Objects.equals(propertyStatus, that.propertyStatus) &&
                Objects.equals(updataTime, that.updataTime) &&
                Objects.equals(newTime, that.newTime) &&
                Objects.equals(unitPrice, that.unitPrice) &&
                Objects.equals(unitCount, that.unitCount) &&
                Objects.equals(applyTime, that.applyTime) &&
                Objects.equals(proDescribe, that.proDescribe) &&
                Objects.equals(proRemark, that.proRemark);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, propertyName, useUuid, propertyType, propertyStatus, updataTime, newTime, unitPrice, unitCount, applyTime, proDescribe, proRemark);
    }
}
